Add capability to update PS1 when loading the EESSI module#154
Add capability to update PS1 when loading the EESSI module#154bedroge merged 13 commits intoEESSI:mainfrom
PS1 when loading the EESSI module#154Conversation
init/modules/EESSI/2023.06.lua
Outdated
|
|
||
| -- change the PS1 if it exists to indicate you have EESSI loaded | ||
| -- (doesn't help with a csh or fish prompt, but we just live with that) | ||
| if os.getenv("EESSI_UPDATE_PS1") then |
There was a problem hiding this comment.
I protected this so as not to change the current behaviour
…e-layer-scripts into update_prompt_with_module
|
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
|
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
|
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
|
I gave it a try on our cluster, but for some reason it doesn't work, the prompt doesn't get changed. I added an But it does exist: |
|
Looks like |
|
Not sure how portable this is (only tested with bash), but something like this may work? edit: for some reason it doesn't work when loading EESSI/2023.06 again while it's already loaded. |
|
Argh, this is starting to come back to me now. We couldn't do this because |
|
Ok, it requires quite a bit of trickery to capture PS1 if it is not exported (and what you do capture is never going to be guaranteed to be the value in the current shell). To be honest the extra complication is not worth it. In our documentation I am going to mention that it requires |
|
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
|
bot: build repo:eessi.io-2025.06-software instance:eessi-bot-deucalion for:arch=aarch64/a64fx |
|
New job on instance
|
|
New job on instance
|
bedroge
left a comment
There was a problem hiding this comment.
Tested it on our cluster, and now it works fine for me too. Lgtm!
|
Staging PR merged. |
With this change you get
By requiring
EESSI_MODULE_UPDATE_PS1I've retained the original behaviour, but I do think the prompt change is nice (especially since EESSI is really an entirely different OS, it's good to aways know when you are inside).